﻿using FluentNHibernate.Mapping;
using Romantics.Domain.Objects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Romantics.Domain.Mappings
{
    class OptionsMap : ClassMap<Options>
    {
        public OptionsMap()
        {
            Table("OPTION_SUMMARY");

            Id(x => x.ID);

            Map(x => x.MainPage)
                .Column("MAIN_PAGE")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.SMPT_Server)
                .Column("SMTP_SERVER")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.SMPT_UserName)
                .Column("SMTP_USER_NAME")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.SMPT_Password)
                .Column("SMTP_PASSWORD")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.SMPT_Port)
                .Column("SMTP_PORT");

            Map(x => x.AdminEmail)
                .Column("ADMIN_EMAIL")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.DisqusDomain)
                .Column("DISQUS_DOMAIN")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.AddThisURL)
                .Column("ADD_THIS_URL")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.ContactPhone1)
                .Column("CONTACT_PHONE1")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.ContactName1)
                .Column("CONTACT_NAME1")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.ContactPhone2)
                .Column("CONTACT_PHONE2")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.ContactName2)
                .Column("CONTACT_NAME2")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.Author)
                .Column("AUTHOR")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.MetaDescription)
                .Column("META_DESCRIPTION")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.MetaKeywords)
                .Column("META_KEYWORDS")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.ContactPhone3)
               .Column("CONTACT_PHONE3")
               .CustomType("StringClob")
               .CustomSqlType("NVARCHAR(MAX)");

            Map(x => x.ContactName3)
                .Column("CONTACT_NAME3")
                .CustomType("StringClob")
                .CustomSqlType("NVARCHAR(MAX)");
        }
    }
}
